package com.sakura.thread.chapter1.test11;

/**
 * Created by apple on 2018/12/11.
 */
public class ThreadLocalTest2 {
    public static ThreadLocal<String> threadLocal = new InheritableThreadLocal<>();

    public static void main(String[] args) {
        //threadLocal.set("hello world");

        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("thread:"+threadLocal.get());
            }
        });

        threadLocal.set("hello world");

        thread.start();
        System.out.println("main is over");

        System.out.println(Integer.MAX_VALUE);
        System.out.println(Integer.MIN_VALUE);
    }
}
